package com.lsh.oms.core.enums;

public enum AfterSalesOrderStatusEnum implements AbstractEnum<Integer>{

    NO_EDIT_4_NO(90, "不可退-未安抚"),
    NO_EDIT_4_YES(91, "不可退-已安抚"),
    SENDING(10, "待下发"),
    PENDING_NO(11, "待处理-不回仓"),
    TO_PICKING(20, "待取货"),
    TO_PICKED(21, "已取货"),
    PROCESSED(80, "已处理"),
    FAILURE(81, "已失效");

    private final Integer value;

    private final String desc;

    AfterSalesOrderStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    public static AfterSalesOrderStatusEnum indexOf(int index) {
        for (AfterSalesOrderStatusEnum item : AfterSalesOrderStatusEnum.values()) {
            if (item.getValue().intValue() == index) {
                return item;
            }
        }
        return null;
    }

}
